package cn.strive.eams.purchase.controller;


import cn.strive.eams.base.response.JsonResult;
import cn.strive.eams.purchase.pojo.dto.PurchaseSaveParam;
import cn.strive.eams.purchase.service.PurchaseService;

import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/v1/purchase")
@Api(tags = "采购模块")
public class PurchaseController {
    @Autowired
    private PurchaseService purchaseService;


    @PostMapping("/save")
    public JsonResult saveVirtual(PurchaseSaveParam purchaseSaveParam){
        log.debug("保存采购信息:purchaseSaveParam={}",purchaseSaveParam);
        purchaseService.savePurchase(purchaseSaveParam);
        return JsonResult.ok();
    }
}
